// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Components/BoxComponent.h"
#include "EventActor.generated.h"

UCLASS()
class CLASS16_API AEventActor : public AActor
{
	GENERATED_BODY()
	
public:
	AEventActor();

	UPROPERTY(VisibleAnywhere)
	UStaticMeshComponent* _mesh;

	UPROPERTY(VisibleAnywhere)
	UBoxComponent* _box;

public:
	virtual void Tick(float DeltaTime) override;

protected:
	virtual void BeginPlay() override;
	bool _hoverToRotate;

	UFUNCTION()
	void OnOverlapBegin(class UPrimitiveComponent* comp, class AActor* otherActor,
		                class UPrimitiveComponent* otherComp, int32 otherBodyIndex,
		                bool fromSweep, const FHitResult& sweepResult);
	
	UFUNCTION()
	void OnOverlapEnd(class UPrimitiveComponent* comp, class AActor* otherActor,
		              class UPrimitiveComponent* otherComp, int32 otherBodyIndex);
	
	UFUNCTION()
	void OnHoverBegin(class UPrimitiveComponent* comp);
	
	UFUNCTION()
	void OnHoverEnd(class UPrimitiveComponent* comp);
	
	UFUNCTION()
	void OnClicked(class UPrimitiveComponent* comp, FKey key);
};
